<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="seace.utils.Constants"%>
 
 <%
	String tipo = "";
	//Verifica se está logado
	if (session.getAttribute("loginUsuario") != null && session.getAttribute("senhaUsuario") != null && 
			session.getAttribute("tipoUsuario") != null) {
			tipo = (String)session.getAttribute("tipoUsuario");
	
	} else {
		out.println("<script> window.location = '../index.jsp';</script>");
	}
%>
 
    <div id="centro">
	    <h2>CERTIFICADOS</h2>
	    
		<form action="../service" method="GET">
			<label for="insc">CPF: </label>
			<input type="text" name="cpf" id="idcpf" onkeypress="return IsNumber(event);"/> 
			<input type="hidden" name="seace" value="GeraCertificados" /> 
			<input type="hidden" name="action" value="<%=Constants.UM%>" /> 
			<select name="tipo">
				<option value="1">Participante</option>
				<option value="2">Ministrante</option>
				<option value="2">Organização</option>
			</select>
			<br />
			<br />	
			<input type="button" id="btn_1cr" <%=(tipo.equals("1"))?"":"disabled=\"disabled\""%> value="Obter Certificado" onclick="validarCPF('idcpf');enviaForm(this.form,'sp_res');"/> 
		</form>
	   	<span id="sp_res">(Digite somente números para o CPF)</span>
    </div>